package com.midcontainer {
	import flash.display.Sprite;
	import flash.text.AntiAliasType;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;

	/**
	 * @author blake
	 */
	public class MainBoxItem extends Sprite {
		private var _box : Sprite;
		private var _field : TextField;
		private var _labelCopy : String;

		public function MainBoxItem(labelCopy : String) {
			_labelCopy = labelCopy;
			createMainBox();
		}

		private function createMainBox() : void {
			var format : TextFormat = new TextFormat();
			format.font = new Font1().fontName;
			format.size = 15;
			format.letterSpacing = 1;
			format.align = TextFormatAlign.LEFT;

			_field = new TextField();
			_field.mouseEnabled = false;
			_field.x = 3;
			_field.width = 20;
			_field.height = 20;
			_field.selectable = false;
			_field.textColor = 0x000000;
			_field.borderColor = 0x000000;
			_field.border = false;
			_field.defaultTextFormat = format;
			_field.embedFonts = false;
			_field.antiAliasType = AntiAliasType.NORMAL;
			_field.autoSize = TextFieldAutoSize.LEFT;
			_field.text = _labelCopy;
			addChild(_field);

			_box = new Sprite();
			_box.graphics.lineStyle(1, 0x000000, 1);
			_box.graphics.beginFill(0x323232, .2);
			_box.graphics.drawRect(0, 0, 120, 80);
			_box.graphics.endFill();
			_box.x = 0;
			_box.y = 0;
			addChild(_box);
		}
	}
}
